handling multiple inputs with a single onchange handler in react